home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
haskell
/
glasgow
/
ghc-src.lha
/
ghc-0.16
/
STARTUP-ghc
< prev
next >
Wrap
Text File
|
1992-12-04
|
3KB
|
89 lines
#! /bin/sh
#
# die quickly if anything goes astray...
set -e
PROJECT=ghc
echo '*******************************************************************'
echo "* A script to help you get $PROJECT going..."
echo '*******************************************************************'
echo '* I hope that you read the relevant documentation and tweaked the *'
echo '* appropriate configuration files _BEFORE_ you started running *'
echo '* this! *'
echo '*******************************************************************'
if [ $# != 1 ] ; then
echo ''
echo 'Please give exactly one argument, a "setup" name.'
echo 'Choices include (see install guide): std, full.'
exit 1
fi
# OK, I'll take that one...
SETUP=$1
# figure out the absolute pathname of the "top" directory
# (the one which has "mkworld", "nofib", "grasp-utils", etc., as subdirs)
hardtop=`pwd`
hardtop=`echo $hardtop | sed 's|^/tmp_mnt/|/|' | sed 's|^/export/|/|' | sed 's|^/grasp_tmp|/local/grasp_tmp|'`
echo ''
echo "*** I decided the top of your build tree is: $hardtop"
# make "mkworld", "literate", and "grasp-utils" (no special configuration)
# make all the Makefiles first
for i in mkworld grasp-utils literate ; do
if [ -h $i ] ; then
echo '' ;
echo "*** $i is a symlink; skipping over..."
else
( set -e; \
cd $i ; \
echo '' ; \
echo "*** configuring $i ..." ; \
make -f Makefile.BOOT BOOT_DEFINES="-P none -S std -DTopDirPwd=$hardtop"; \
echo '' ; \
echo "*** making Makefiles in $i ..." ; \
make Makefiles \
)
fi
done
# now make the dependencies and Real Stuff
for i in mkworld literate grasp-utils ; do
if [ ! -h $i ] ; then
( set -e; \
cd $i ; \
echo '' ; \
echo "*** making make dependencies in $i ..." ; \
make depend ; \
echo '' ; \
echo "*** making all in $i ..." ; \
make all \
)
fi
done
# OK, now make the $PROJECT Makefiles (and the dependencies)
cd $PROJECT
make -f Makefile.BOOT BOOT_DEFINES="-P $PROJECT -S $SETUP -C mkworld -DTopDirPwd=$hardtop"
echo ''
echo "*** configuring $PROJECT project itself (it takes a while :-() ..."
make Makefile
make Makefiles
echo ''
echo "*** adding Makefile dependencies for $PROJECT project ..."
make depend
echo ''
echo '*******************************************************************'
echo "* Hallelujah! You should be able to proceed with $PROJECT, setup $SETUP."
echo "* (Please consult the documentation.)"
echo '*******************************************************************'
exit 0